package com.taotaojs.mybootsuper.bean;

import lombok.*;

/**
 * mapper中map类型对象
 *
 * @author: TaoTaojs
 * @Date: 2020/4/21 4:42 PM
 * @Description:
 * @关联类:
 * @参考链接：
 * @History: <author>        <time>                      <version>          <desc>
 * TaoTaojs        2020/4/21 4:42 PM                V1.0                    key:value键值对对象，主要用于sql中
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Builder
@EqualsAndHashCode(callSuper = false)
public class KeyValueBean<T, V> {

    private T key;
    private V value;

    public KeyValueBean<T,V> put(T key, V value){
        this.key = key;
        this.value = value;
        return this;
    }

    public static<T,V> KeyValueBean<T,V> create(T key, V value){
        return new KeyValueBean<>(key, value);
    }

}
